3.3.96 \(\int \frac {(a+b \sin (c+\frac {d}{x}))^2}{e+f x} \, dx\) [296]

3.3.96.1 Optimal result
3.3.96.2 Mathematica [A] (verified)
3.3.96.3 Rubi [A] (verified)
3.3.96.4 Maple [A] (verified)
3.3.96.5 Fricas [A] (verification not implemented)
3.3.96.6 Sympy [F]
3.3.96.7 Maxima [F]
3.3.96.8 Giac [A] (verification not implemented)
3.3.96.9 Mupad [F(-1)]

3.3.96.1 Optimal result

Integrand size = 22, antiderivative size = 255 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=-\frac {b^2 \cos \left (2 c-\frac {2 d f}{e}\right ) \operatorname {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 f}+\frac {b^2 \cos (2 c) \operatorname {CosIntegral}\left (\frac {2 d}{x}\right )}{2 f}+\frac {a^2 \log \left (f+\frac {e}{x}\right )}{f}+\frac {b^2 \log \left (f+\frac {e}{x}\right )}{2 f}+\frac {a^2 \log (x)}{f}+\frac {b^2 \log (x)}{2 f}-\frac {2 a b \operatorname {CosIntegral}\left (\frac {d}{x}\right ) \sin (c)}{f}+\frac {2 a b \operatorname {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (c-\frac {d f}{e}\right )}{f}+\frac {2 a b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{f}+\frac {b^2 \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 f}-\frac {2 a b \cos (c) \text {Si}\left (\frac {d}{x}\right )}{f}-\frac {b^2 \sin (2 c) \text {Si}\left (\frac {2 d}{x}\right )}{2 f} \]

output
1/2*b^2*Ci(2*d/x)*cos(2*c)/f-1/2*b^2*Ci(2*d*(f/e+1/x))*cos(2*c-2*d*f/e)/f+ 
a^2*ln(f+e/x)/f+1/2*b^2*ln(f+e/x)/f+a^2*ln(x)/f+1/2*b^2*ln(x)/f+2*a*b*cos( 
c-d*f/e)*Si(d*(f/e+1/x))/f-2*a*b*cos(c)*Si(d/x)/f-2*a*b*Ci(d/x)*sin(c)/f-1 
/2*b^2*Si(2*d/x)*sin(2*c)/f+1/2*b^2*Si(2*d*(f/e+1/x))*sin(2*c-2*d*f/e)/f+2 
*a*b*Ci(d*(f/e+1/x))*sin(c-d*f/e)/f
 
3.3.96.2 Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.76 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=\frac {-b^2 \cos \left (2 c-\frac {2 d f}{e}\right ) \operatorname {CosIntegral}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+b^2 \cos (2 c) \operatorname {CosIntegral}\left (\frac {2 d}{x}\right )+2 a^2 \log (e+f x)+b^2 \log (e+f x)-4 a b \operatorname {CosIntegral}\left (\frac {d}{x}\right ) \sin (c)+4 a b \operatorname {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (c-\frac {d f}{e}\right )+4 a b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )+b^2 \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (2 d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-4 a b \cos (c) \text {Si}\left (\frac {d}{x}\right )-b^2 \sin (2 c) \text {Si}\left (\frac {2 d}{x}\right )}{2 f} \]

input
Integrate[(a + b*Sin[c + d/x])^2/(e + f*x),x]
 
output
(-(b^2*Cos[2*c - (2*d*f)/e]*CosIntegral[2*d*(f/e + x^(-1))]) + b^2*Cos[2*c 
]*CosIntegral[(2*d)/x] + 2*a^2*Log[e + f*x] + b^2*Log[e + f*x] - 4*a*b*Cos 
Integral[d/x]*Sin[c] + 4*a*b*CosIntegral[d*(f/e + x^(-1))]*Sin[c - (d*f)/e 
] + 4*a*b*Cos[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))] + b^2*Sin[2*c - ( 
2*d*f)/e]*SinIntegral[2*d*(f/e + x^(-1))] - 4*a*b*Cos[c]*SinIntegral[d/x] 
- b^2*Sin[2*c]*SinIntegral[(2*d)/x])/(2*f)
 
3.3.96.3 Rubi [A] (verified)

Time = 0.82 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3912, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx\)

\(\Big \downarrow \) 3912

\(\displaystyle -\int \left (\frac {x \left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{f}-\frac {e \left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{f \left (\frac {e}{x}+f\right )}\right )d\frac {1}{x}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 \log \left (\frac {e}{x}+f\right )}{f}-\frac {a^2 \log \left (\frac {1}{x}\right )}{f}+\frac {2 a b \sin \left (c-\frac {d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {f d}{e}+\frac {d}{x}\right )}{f}-\frac {2 a b \sin (c) \operatorname {CosIntegral}\left (\frac {d}{x}\right )}{f}+\frac {2 a b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {f d}{e}+\frac {d}{x}\right )}{f}-\frac {2 a b \cos (c) \text {Si}\left (\frac {d}{x}\right )}{f}-\frac {b^2 \cos \left (2 c-\frac {2 d f}{e}\right ) \operatorname {CosIntegral}\left (\frac {2 f d}{e}+\frac {2 d}{x}\right )}{2 f}+\frac {b^2 \cos (2 c) \operatorname {CosIntegral}\left (\frac {2 d}{x}\right )}{2 f}+\frac {b^2 \sin \left (2 c-\frac {2 d f}{e}\right ) \text {Si}\left (\frac {2 f d}{e}+\frac {2 d}{x}\right )}{2 f}-\frac {b^2 \sin (2 c) \text {Si}\left (\frac {2 d}{x}\right )}{2 f}+\frac {b^2 \log \left (\frac {e}{x}+f\right )}{2 f}-\frac {b^2 \log \left (\frac {1}{x}\right )}{2 f}\)

input
Int[(a + b*Sin[c + d/x])^2/(e + f*x),x]
 
output
-1/2*(b^2*Cos[2*c - (2*d*f)/e]*CosIntegral[(2*d*f)/e + (2*d)/x])/f + (b^2* 
Cos[2*c]*CosIntegral[(2*d)/x])/(2*f) + (a^2*Log[f + e/x])/f + (b^2*Log[f + 
 e/x])/(2*f) - (a^2*Log[x^(-1)])/f - (b^2*Log[x^(-1)])/(2*f) - (2*a*b*CosI 
ntegral[d/x]*Sin[c])/f + (2*a*b*CosIntegral[(d*f)/e + d/x]*Sin[c - (d*f)/e 
])/f + (2*a*b*Cos[c - (d*f)/e]*SinIntegral[(d*f)/e + d/x])/f + (b^2*Sin[2* 
c - (2*d*f)/e]*SinIntegral[(2*d*f)/e + (2*d)/x])/(2*f) - (2*a*b*Cos[c]*Sin 
Integral[d/x])/f - (b^2*Sin[2*c]*SinIntegral[(2*d)/x])/(2*f)
 

3.3.96.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3912
Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f 
_.)*(x_))^(n_)])^(p_.), x_Symbol] :> Simp[1/(n*f)   Subst[Int[ExpandIntegra 
nd[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m, x], 
 x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p 
, 0] && IntegerQ[1/n]
 
3.3.96.4 Maple [A] (verified)

Time = 0.62 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.18

method result size
parts \(\frac {\ln \left (f x +e \right ) a^{2}}{f}-\frac {b^{2} \ln \left (\frac {d}{x}\right )}{2 f}+\frac {b^{2} \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{2 f}-\frac {b^{2} \operatorname {Si}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{2 f}-\frac {b^{2} \operatorname {Ci}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{2 f}-\frac {b^{2} \operatorname {Si}\left (\frac {2 d}{x}\right ) \sin \left (2 c \right )}{2 f}+\frac {b^{2} \operatorname {Ci}\left (\frac {2 d}{x}\right ) \cos \left (2 c \right )}{2 f}-2 a b d \left (-\frac {e \left (\frac {\operatorname {Si}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\operatorname {Ci}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}\right )}{d f}+\frac {\operatorname {Si}\left (\frac {d}{x}\right ) \cos \left (c \right )+\operatorname {Ci}\left (\frac {d}{x}\right ) \sin \left (c \right )}{d f}\right )\) \(302\)
risch \(-\frac {i a b \,{\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (\frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right )}{f}+\frac {i a b \,\operatorname {Ei}_{1}\left (\frac {i d}{x}\right ) {\mathrm e}^{-i c}}{f}+\frac {\ln \left (f x +e \right ) a^{2}}{f}+\frac {\ln \left (f x +e \right ) b^{2}}{2 f}-\frac {b^{2} \operatorname {Ei}_{1}\left (\frac {2 i d}{x}\right ) {\mathrm e}^{-2 i c}}{4 f}+\frac {b^{2} {\mathrm e}^{-\frac {2 i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (\frac {2 i d}{x}+2 i c -\frac {2 i \left (c e -d f \right )}{e}\right )}{4 f}-\frac {b^{2} \operatorname {Ei}_{1}\left (-\frac {2 i d}{x}\right ) {\mathrm e}^{2 i c}}{4 f}+\frac {b^{2} {\mathrm e}^{\frac {2 i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (-\frac {2 i d}{x}-2 i c -\frac {2 \left (-i c e +i f d \right )}{e}\right )}{4 f}+\frac {i a b \,{\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \operatorname {Ei}_{1}\left (-\frac {i d}{x}-i c -\frac {-i c e +i f d}{e}\right )}{f}-\frac {i a b \,\operatorname {Ei}_{1}\left (-\frac {i d}{x}\right ) {\mathrm e}^{i c}}{f}\) \(325\)
derivativedivides \(-d \left (\frac {a^{2} \ln \left (\frac {d}{x}\right )}{f d}-\frac {a^{2} \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{f d}-\frac {2 a b e \left (-\frac {\operatorname {Si}\left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\operatorname {Ci}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}\right )}{f d}+\frac {2 a b \left (\operatorname {Si}\left (\frac {d}{x}\right ) \cos \left (c \right )+\operatorname {Ci}\left (\frac {d}{x}\right ) \sin \left (c \right )\right )}{f d}+\frac {b^{2} \ln \left (\frac {d}{x}\right )}{2 f d}-\frac {b^{2} \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{2 f d}+\frac {b^{2} e \left (-\frac {2 \,\operatorname {Si}\left (-\frac {2 d}{x}-2 c -\frac {2 \left (-c e +d f \right )}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{e}+\frac {2 \,\operatorname {Ci}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{e}\right )}{4 f d}-\frac {b^{2} \left (-2 \,\operatorname {Si}\left (\frac {2 d}{x}\right ) \sin \left (2 c \right )+2 \,\operatorname {Ci}\left (\frac {2 d}{x}\right ) \cos \left (2 c \right )\right )}{4 f d}\right )\) \(354\)
default \(-d \left (\frac {a^{2} \ln \left (\frac {d}{x}\right )}{f d}-\frac {a^{2} \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{f d}-\frac {2 a b e \left (-\frac {\operatorname {Si}\left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\operatorname {Ci}\left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}\right )}{f d}+\frac {2 a b \left (\operatorname {Si}\left (\frac {d}{x}\right ) \cos \left (c \right )+\operatorname {Ci}\left (\frac {d}{x}\right ) \sin \left (c \right )\right )}{f d}+\frac {b^{2} \ln \left (\frac {d}{x}\right )}{2 f d}-\frac {b^{2} \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{2 f d}+\frac {b^{2} e \left (-\frac {2 \,\operatorname {Si}\left (-\frac {2 d}{x}-2 c -\frac {2 \left (-c e +d f \right )}{e}\right ) \sin \left (\frac {-2 c e +2 d f}{e}\right )}{e}+\frac {2 \,\operatorname {Ci}\left (\frac {2 d}{x}+2 c +\frac {-2 c e +2 d f}{e}\right ) \cos \left (\frac {-2 c e +2 d f}{e}\right )}{e}\right )}{4 f d}-\frac {b^{2} \left (-2 \,\operatorname {Si}\left (\frac {2 d}{x}\right ) \sin \left (2 c \right )+2 \,\operatorname {Ci}\left (\frac {2 d}{x}\right ) \cos \left (2 c \right )\right )}{4 f d}\right )\) \(354\)

input
int((a+b*sin(c+d/x))^2/(f*x+e),x,method=_RETURNVERBOSE)
 
output
ln(f*x+e)/f*a^2-1/2*b^2/f*ln(d/x)+1/2*b^2/f*ln(-c*e+d*f+e*(c+d/x))-1/2*b^2 
/f*Si(2*d/x+2*c+2*(-c*e+d*f)/e)*sin(2*(-c*e+d*f)/e)-1/2*b^2/f*Ci(2*d/x+2*c 
+2*(-c*e+d*f)/e)*cos(2*(-c*e+d*f)/e)-1/2*b^2*Si(2*d/x)*sin(2*c)/f+1/2*b^2* 
Ci(2*d/x)*cos(2*c)/f-2*a*b*d*(-e/d/f*(Si(d/x+c+(-c*e+d*f)/e)*cos((-c*e+d*f 
)/e)/e-Ci(d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)/e)/e)+1/d/f*(Si(d/x)*cos(c)+C 
i(d/x)*sin(c)))
 
3.3.96.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 217, normalized size of antiderivative = 0.85 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=\frac {b^{2} \cos \left (2 \, c\right ) \operatorname {Ci}\left (\frac {2 \, d}{x}\right ) - b^{2} \cos \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) \operatorname {Ci}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) - 4 \, a b \operatorname {Ci}\left (\frac {d}{x}\right ) \sin \left (c\right ) - 4 \, a b \operatorname {Ci}\left (\frac {d f x + d e}{e x}\right ) \sin \left (-\frac {c e - d f}{e}\right ) - b^{2} \sin \left (2 \, c\right ) \operatorname {Si}\left (\frac {2 \, d}{x}\right ) - 4 \, a b \cos \left (c\right ) \operatorname {Si}\left (\frac {d}{x}\right ) - b^{2} \sin \left (-\frac {2 \, {\left (c e - d f\right )}}{e}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + d e\right )}}{e x}\right ) + 4 \, a b \cos \left (-\frac {c e - d f}{e}\right ) \operatorname {Si}\left (\frac {d f x + d e}{e x}\right ) + {\left (2 \, a^{2} + b^{2}\right )} \log \left (f x + e\right )}{2 \, f} \]

input
integrate((a+b*sin(c+d/x))^2/(f*x+e),x, algorithm="fricas")
 
output
1/2*(b^2*cos(2*c)*cos_integral(2*d/x) - b^2*cos(-2*(c*e - d*f)/e)*cos_inte 
gral(2*(d*f*x + d*e)/(e*x)) - 4*a*b*cos_integral(d/x)*sin(c) - 4*a*b*cos_i 
ntegral((d*f*x + d*e)/(e*x))*sin(-(c*e - d*f)/e) - b^2*sin(2*c)*sin_integr 
al(2*d/x) - 4*a*b*cos(c)*sin_integral(d/x) - b^2*sin(-2*(c*e - d*f)/e)*sin 
_integral(2*(d*f*x + d*e)/(e*x)) + 4*a*b*cos(-(c*e - d*f)/e)*sin_integral( 
(d*f*x + d*e)/(e*x)) + (2*a^2 + b^2)*log(f*x + e))/f
 
3.3.96.6 Sympy [F]

\[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=\int \frac {\left (a + b \sin {\left (c + \frac {d}{x} \right )}\right )^{2}}{e + f x}\, dx \]

input
integrate((a+b*sin(c+d/x))**2/(f*x+e),x)
 
output
Integral((a + b*sin(c + d/x))**2/(e + f*x), x)
 
3.3.96.7 Maxima [F]

\[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=\int { \frac {{\left (b \sin \left (c + \frac {d}{x}\right ) + a\right )}^{2}}{f x + e} \,d x } \]

input
integrate((a+b*sin(c+d/x))^2/(f*x+e),x, algorithm="maxima")
 
output
a^2*log(f*x + e)/f - 1/2*(2*b^2*f*integrate(1/4*cos(2*(c*x + d)/x)/((f*x + 
 e)*cos(2*(c*x + d)/x)^2 + (f*x + e)*sin(2*(c*x + d)/x)^2), x) + 2*b^2*f*i 
ntegrate(1/4*cos(2*(c*x + d)/x)/(f*x + e), x) - 2*a*b*f*integrate(sin((c*x 
 + d)/x)/((f*x + e)*cos((c*x + d)/x)^2 + (f*x + e)*sin((c*x + d)/x)^2), x) 
 - 2*a*b*f*integrate(sin((c*x + d)/x)/(f*x + e), x) - b^2*log(f*x + e))/f
 
3.3.96.8 Giac [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 362, normalized size of antiderivative = 1.42 \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=\frac {b^{2} d \cos \left (2 \, c\right ) \operatorname {Ci}\left (-2 \, c + \frac {2 \, {\left (c x + d\right )}}{x}\right ) - b^{2} d \cos \left (\frac {2 \, {\left (c e - d f\right )}}{e}\right ) \operatorname {Ci}\left (-\frac {2 \, {\left (c e - d f - \frac {{\left (c x + d\right )} e}{x}\right )}}{e}\right ) - 4 \, a b d \operatorname {Ci}\left (-c + \frac {c x + d}{x}\right ) \sin \left (c\right ) + 4 \, a b d \operatorname {Ci}\left (-\frac {c e - d f - \frac {{\left (c x + d\right )} e}{x}}{e}\right ) \sin \left (\frac {c e - d f}{e}\right ) + b^{2} d \sin \left (2 \, c\right ) \operatorname {Si}\left (2 \, c - \frac {2 \, {\left (c x + d\right )}}{x}\right ) + 4 \, a b d \cos \left (c\right ) \operatorname {Si}\left (c - \frac {c x + d}{x}\right ) - b^{2} d \sin \left (\frac {2 \, {\left (c e - d f\right )}}{e}\right ) \operatorname {Si}\left (\frac {2 \, {\left (c e - d f - \frac {{\left (c x + d\right )} e}{x}\right )}}{e}\right ) - 4 \, a b d \cos \left (\frac {c e - d f}{e}\right ) \operatorname {Si}\left (\frac {c e - d f - \frac {{\left (c x + d\right )} e}{x}}{e}\right ) + 2 \, a^{2} d \log \left (c e - d f - \frac {{\left (c x + d\right )} e}{x}\right ) + b^{2} d \log \left (c e - d f - \frac {{\left (c x + d\right )} e}{x}\right ) - 2 \, a^{2} d \log \left (c - \frac {c x + d}{x}\right ) - b^{2} d \log \left (c - \frac {c x + d}{x}\right )}{2 \, d f} \]

input
integrate((a+b*sin(c+d/x))^2/(f*x+e),x, algorithm="giac")
 
output
1/2*(b^2*d*cos(2*c)*cos_integral(-2*c + 2*(c*x + d)/x) - b^2*d*cos(2*(c*e 
- d*f)/e)*cos_integral(-2*(c*e - d*f - (c*x + d)*e/x)/e) - 4*a*b*d*cos_int 
egral(-c + (c*x + d)/x)*sin(c) + 4*a*b*d*cos_integral(-(c*e - d*f - (c*x + 
 d)*e/x)/e)*sin((c*e - d*f)/e) + b^2*d*sin(2*c)*sin_integral(2*c - 2*(c*x 
+ d)/x) + 4*a*b*d*cos(c)*sin_integral(c - (c*x + d)/x) - b^2*d*sin(2*(c*e 
- d*f)/e)*sin_integral(2*(c*e - d*f - (c*x + d)*e/x)/e) - 4*a*b*d*cos((c*e 
 - d*f)/e)*sin_integral((c*e - d*f - (c*x + d)*e/x)/e) + 2*a^2*d*log(c*e - 
 d*f - (c*x + d)*e/x) + b^2*d*log(c*e - d*f - (c*x + d)*e/x) - 2*a^2*d*log 
(c - (c*x + d)/x) - b^2*d*log(c - (c*x + d)/x))/(d*f)
 
3.3.96.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \sin \left (c+\frac {d}{x}\right )\right )^2}{e+f x} \, dx=\int \frac {{\left (a+b\,\sin \left (c+\frac {d}{x}\right )\right )}^2}{e+f\,x} \,d x \]

input
int((a + b*sin(c + d/x))^2/(e + f*x),x)
 
output
int((a + b*sin(c + d/x))^2/(e + f*x), x)